<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
Object obj=request.getSession().getAttribute("role_resource");
if(null==obj){
	response.setStatus(1000);
	return;
}
%> 
	<script type="text/javascript">
	var ciourl,tip;
	
	var p1_store = new Ext.data.JsonStore( {
		root: "data", 
		totalProperty: "total", 
		fields: [ "id", "name", "state"], 
		url: "work!queryWatch.action"
	});
	
	var watch_pel = new Ext.grid.GridPanel({
			id: "p1", 
			store: p1_store, 
			border: false, 
			autoExpandColumn: "name", 
			autoExpandMin: 200, 
			headersDisabled: true,
			columns: [
				new Ext.grid.RowNumberer( {header: "序号", width: 35}), 
			    {dataIndex: "id", header: "期别" , menuDisabled: true}, 
			    {dataIndex: "name", header: "类别", id: "name", menuDisabled: true}, 	
				{
				xtype : "actioncolumn", 
				dataIndex: "state",
				header: "状态", 
				width : 34, 
				menuDisabled: true,
				renderer:function(value){
					if("0" == value){
						ciourl = "images/shared/icons/fam/information.png";
						tip = "未开始";
					}
					else if("1" == value){
						ciourl = "js/ext/resources/images/access/grid/grid-loading.gif";
						tip = "处理中";
					}
					else if("2" == value){
						ciourl = "images/shared/icons/fam/accept.png";
						tip = "处理成功";
					}
					else if("3" == value){
						ciourl = "images/shared/icons/fam/cross.gif";
						tip = "处理失败";
					}
					this.icon = ciourl;
					this.tooltip = tip;
					return "";
				}
				}
			], 
			bbar: new Ext.ux.PagingToolbar({
            	pageSize: limit, 
            	store: p1_store
        	})	
	});
	p1_store.load({params: {start: 0, limit: limit}});
	
		
	var CenterPanel=Ext.getCmp("CenterPanel");
	CenterPanel.removeAll();
	CenterPanel.add(watch_pel);
	CenterPanel.doLayout();
</script>